package com.bluesmart.mia;

import com.ant.liao.GifView;
import com.ant.liao.GifView.GifImageType;

import android.os.Bundle;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.TextView;

public class AddDeviceActivity extends BaseActivity implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_add_device);

		((TextView) findViewById(R.id.center)).setText(getString(R.string.wifi_title_0));
		
		findViewById(R.id.left).setOnClickListener(this);
		findViewById(R.id.btn).setOnClickListener(this);
		findViewById(R.id.tip).setOnClickListener(this);
		findViewById(R.id.cover).setOnClickListener(this);
		
		WebView webview=(WebView) findViewById(R.id.gif);
		webview.setHorizontalScrollBarEnabled(false);//水平不显示  
		webview.setVerticalScrollBarEnabled(false); //垂直不显示
		String data = "<HTML><IMG src=\"file:///android_asset/start_wifi.gif\"width=300;height=300/>"; 
		webview.loadDataWithBaseURL("file:///android_asset/start_wifi.gif", data, "text/html", "utf-8", null);
		webview.setBackgroundColor(0x00000000); 
	}

	@Override
	public void onClick(View arg0) {
		if(R.id.left == arg0.getId()) finish();
		else if(R.id.btn == arg0.getId())
		{
			startActivity(new Intent(this,AddDeviceWifiActivity.class));
			finish();
		}
		else if(R.id.tip == arg0.getId())
		{
			startActivity(new Intent(this,AddDeviceBareActivity.class));
		}
	}
}
